home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / BC16.MK next >
Text File  |  1995-02-06  |  4KB  |  138 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Borland C++ 4.x 16 bit version. Supports Borland's DOS Power
  12. #               Pack DPMI16 DOS extender.
  13. #
  14. # $Id: bc16.mk 1.1 1995/02/06 12:49:39 kjb release $
  15. #
  16. #############################################################################
  17.  
  18. # Disable warnings for macros redefined here that were given
  19. # on the command line.
  20. __.SILENT       := $(.SILENT)
  21. .SILENT         := yes
  22.  
  23. # File suffix definitions
  24.    L            := .lib   # Libraries
  25.    E            := .exe   # Executables
  26.    O            := .obj   # Objects
  27.    A            := .asm   # Assembler sources
  28.    P            := .cpp   # C++ sources
  29.  
  30. # Import enivornment variables that we use
  31. TMPDIR := $(ROOTDIR)/tmp
  32. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA
  33. .IMPORT .IGNORE : USE_DPMI16 USE_WIN16 FPU
  34.  
  35. # We use the MSDOS shell at all times
  36.    SHELL        := $(COMSPEC)
  37.    GROUPSHELL   := $(SHELL)
  38.    SHELLFLAGS   := $(SWITCHAR)c
  39.    GROUPFLAGS   := $(SHELLFLAGS)
  40.    SHELLMETAS   := *"?<>
  41.    GROUPSUFFIX  := .bat
  42.    DIRSEPSTR    := \\
  43.    DIVFILE       = $(TMPFILE:s,/,\)
  44.  
  45. # Default commands for compiling, assembling linking and archiving
  46.    CC           := bcc      # C-compiler and flags
  47.    CFLAGS       := -ml -H=bcc.sym
  48.    AS           := tasm     # Assembler and flags
  49.    ASFLAGS      := /mx /m /i$(SCITECH)\INCLUDE
  50.    LD           := bcc      # Loader and flags
  51.    LDFLAGS       = $(CFLAGS)
  52.    LIBR         := tlib     # Librarian
  53.    LIBFLAGS     := /C
  54.  
  55. # Optionally turn on debugging information
  56. .IF $(DBG)
  57.    CFLAGS       += -v       # Turn on debugging for C compiler
  58.    ASFLAGS      += /zi      # Turn on debugging for assembler
  59.    LIBFLAGS     += /P128    # Larger page size for libraries with debug info!
  60. .END
  61.  
  62. # Optionally turn on optimisations
  63. .IF $(OPT)
  64.    CFLAGS       += -4 -O2
  65. .END
  66.  
  67. # Optionally turn on direct i387 FPU instructions
  68.  
  69. .IF $(FPU)
  70.    CFLAGS       += -f287 -DFPU387
  71.    ASFLAGS      += -DFPU387
  72. .END
  73.  
  74. # Optionally compile a shareware version of a product
  75. .IF $(SHW)
  76.    LIB_DIR      := LIBSW
  77.    CFLAGS       += -DSHAREWARE
  78. .ELSE
  79.    LIB_DIR      := LIB
  80. .END
  81.  
  82. # Optionally compile a beta release version of a product
  83. .IF $(BETA)
  84.    CFLAGS       += -DBETA
  85.    ASFLAGS      += -DBETA
  86. .END
  87.  
  88. # Optionally use the DOS Power Pack DPMI16 extender for protected mode
  89. .IF $(USE_DPMI16)
  90.    DX_CFLAGS    += -WX -DDPMI16
  91.    DX_ASFLAGS   += -DDPMI16 -D__PM286__
  92. .ELIF $(USE_WIN16)
  93.    DX_CFLAGS    += -WX -DWINDPMI16
  94.    DX_ASFLAGS   += -DWINDPMI16 -D__PM286__
  95. .END
  96.  
  97. # Place to look for PMODE library files
  98.  
  99. .IF $(MK_PMODE)
  100. .ELIF $(USE_DPMI16)
  101. PMLIB           := dpmi16\pmode.lib
  102. .ELIF $(USE_WIN16)
  103. PMLIB           := win16\pmode.lib
  104. .ELSE
  105. PMLIB           := pmode.lib
  106. .END
  107.  
  108. # Define where to install library files
  109.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\BC16
  110.    LIB_DEST     := $(LIB_BASE)
  111.  
  112. # Definition of $(MAKE) macro for recursive makes.
  113.    MAKE = $(MAKECMD) $(MFLAGS)
  114.  
  115. # Macro to install a library file
  116.    INSTALL      := cp
  117.  
  118. # Implicit generation rules for making object files
  119.    %$O: %.c ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
  120.    %$O: %$P ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
  121.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  122.  
  123. # Implicit rule for building a library file using response file
  124.    %$L:      ; $(LIBR) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
  125.  
  126. # Implicit rule for building an executable file using response file
  127.    %$E:      ; $(LD) @$(mktmp $(LDFLAGS) -e$@ $(&:s/\/\\) $(PMLIB) $(EXELIBS))
  128.  
  129. # DMAKE uses this recipe to remove intermediate targets
  130. .REMOVE :; $(RM) -f $<
  131.  
  132. # Turn warnings back to previous setting.
  133. .SILENT := $(__.SILENT)
  134.  
  135. # We dont use TABS in our makefiles
  136. .NOTABS         := yes
  137.  
  138.